<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../css/base.css" />
    <link rel="stylesheet" href="../css/cart.css" />
    <script src="../js/jquery.js"></script>
    
  </head>
  <body>
    <!-- 详情页 -->
    <div class="box">
      <div class="logo"><img src="../img/logo.png" alt="" /></div>
      <ul>
        <li>首页</li>
        <li>企业采购</li>
        <li>会员福利社</li>
        <li>美的美居</li>
      </ul>
      <input type="text" class="inp" />
      <i class=""></i>
      <i class=""></i>
      <img src="" alt="登录" />
    </div>
    <div class="header">
      <img src="../img/18.png" alt="" />
    </div>
    <div class="nav">
      <ul>
        <li>首页</li>
        <li>空调</li>
        <li>KFR-35GW/N8MHA1</li>
      </ul>
    </div>
     <div class="ban">
      <!-- <div class="boot">
        <img src="../img/34.png" alt="" />
      </div>
      <div class="banbu">
        <h1>
         <span>自营</span>  
          开门红美的极光先锋新一级能效大1.5匹智能家电变频冷暖空调挂机KFR-35GW/N8MHA1
        </h1>
        <h2><i>极速保价</i> <span> 新能效1级；第四代自清洁； ECO模式</span></h2>
        <div class="xx"><span>¥2499.00</span></div>
        <h3>优惠 送积分最高送249积分</h3>
        <h3>评价 服务到位(2078)服务快，(1505)性价比高(1110)</h3>
        <h3>颜色 极地白</h3>
        <h3>规格 大3匹大2匹大1.5匹</h3>
        <h3>服务 延长保修</h3>
        <h3>供货商 美的官网商城</h3>
        <div class="an"> 
        <span class="one">加入购物车</span>
        <span class="two">点击购买</span>
      </div>
      </div> -->
    </div>
  </div>
  <script>
    let pid = location.search.split("=")[1];
    console.log(pid)
  $.get("http://jx.xuzhixiang.top/ap/api/detail.php", {
    id: pid,
    pagesize: 1,
    pagenum: 1,
  }).then((res) => {
    console.log(res);
    let data = res.data;
        console.log(data)
        
    let str = `
    <div class="boot">
        <img src="../img/${data.pimg}" alt="" />
      </div>
      <div class="banbu">
        <h1>
         <span>自营</span>  
         ${data.pname}
        <h2><i>极速保价</i> <span> 新能效1级；第四代自清洁； ECO模式</span></h2>
        <div class="xx"><span> ${data.pprice}</span></div>
        <h3>优惠 送积分最高送249积分</h3>
        <h3>评价 服务到位(2078)服务快，(1505)性价比高(1110)</h3>
        <h3>颜色 极地白</h3>
        <h3>规格 大3匹大2匹大1.5匹</h3>
        <h3>服务 延长保修</h3>
        <h3>供货商 美的官网商城</h3>
        <div class="an"> 
       <a href="../html/list.html?id=${id=pid}"> <span>加入购物车</span>
        <span class="two">点击购买</span></a>
      </div>
      </div>
  `;
      $(".ban").html(str);
      });
</script>
  </body>
</html>
